package com.ruoyi.smart.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Data
@Configuration
@ConfigurationProperties(prefix = "mqtt")
public class MqttProperties {
    private String serverUri;
    private String clientId;
    private String username;
    private String password;
    private int connectionTimeout = 30;
    private int keepAliveInterval = 60;
    private boolean automaticReconnect = false;
    private int maxReconnectDelay = 128;
    private boolean enableEmqxSystemTopics = true;                                      // 是否启用EMQX系统主题
    private String clientConnectedTopic = "$SYS/brokers/+/clients/+/connected";
    private String clientDisconnectedTopic = "$SYS/brokers/+/clients/+/disconnected";
    private String[] subscriptionTopics;
    private int[] subscriptionQos;
}
